{{
menus = [
    ('home', 'Home', '/'),
    ('group', 'Group', '/group'),
    ('user', 'User', '/user'),
    ('about', 'About', '/about'),
]
def menu(current='home'):
    for id, caption, link in menus:
        if id == current:
            out.write('<li class="active"><a href="%s"><span>%s</span></a></li>' % (link, caption), escape=False)
        else:
            out.write('<li><a href="%s"><span>%s</span></a></li>' % (link, caption), escape=False)
        pass
    pass
pass
}}
